﻿Imports System.Data
Imports VSModel
Imports Cls_Common
Partial Class FrontEnd_Control_Store_Footer
    Inherits System.Web.UI.UserControl
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then


            If Not Page.RouteData.Values("Id") Is Nothing Then

                LoadMenu(Page.RouteData.Values("Id"))
            End If
        End If
    End Sub
    Protected Sub LoadMenu(ByVal StoreId As Integer)



        Dim lstNode As New DataSet
        lstNode.ReadXml(MapPath("../../../xml/HeaderStoreMenu.xml"))
        With rptMenu
            .DataSource = lstNode.Tables("Node")
            .DataBind()
        End With
    End Sub
    Protected Sub rptMenu_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.RepeaterItemEventArgs) Handles rptMenu.ItemDataBound
        Dim hplTitle As HyperLink
        hplTitle = e.Item.FindControl("hplTitle")



        hplTitle.Text = e.Item.DataItem("Title")
        hplTitle.NavigateUrl = MainDomain & Page.RouteData.Values("QueryString") & "-" & Page.RouteData.Values("Id") & "/" & e.Item.DataItem("URL")




    End Sub
End Class
